package org.example.model;

import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;

/**
 * @Author: wwy
 * @Date: 2020/11/26 15:22
 */
public class Plan {
    private final long id;
    private final StringProperty planName;
    private final StringProperty priority ;


    public Plan(long id,String planName, String priority) {
        this.id = id;
        this.planName = new SimpleStringProperty(planName);
        this.priority = new SimpleStringProperty(priority);
    }

    public String getPlanName() {
        return planName.get();
    }

    public StringProperty planNameProperty() {
        return planName;
    }

    public void setPlanName(String planName) {
        this.planName.set(planName);
    }

    public String getPriority() {
        return priority.get();
    }

    public StringProperty priorityProperty() {
        return priority;
    }

    public void setPriority(String priority) {
        this.priority.set(priority);
    }

    public long getId() {
        return id;
    }

    @Override
    public String toString() {
        return "Plan{" +
                "id=" + id +
                ", planName=" + planName +
                ", priority=" + priority +
                '}';
    }
}
